import open3d as o3d
import os

DIR = "/share/datasets/hhodataset/azure2/20231018"

result = []
for clip in os.listdir(DIR):
    file_name = os.path.join(DIR, clip, "azure2.mkv")
    reader = o3d.io.AzureKinectMKVReader()
    reader.open(file_name)
    meta = reader.get_metadata()
    # print(clip, meta.stream_length_usec / 1000 / 1000)
    result.append((clip, meta.stream_length_usec / 1000 / 1000))
    reader.close()

for item in result:
    print(item)